<?php 
$CI =& get_instance();
$CI->load->database();
$CI->load->library("front/header_lib");
$query_pages = $CI->db->get_where('bur_staticpages',array('staticpage_link'=>'design_directory'));
foreach($query_pages->result() as $row_vals)
{
    $title = $row_vals->staticpage_title;
	$metakey_page = $row_vals->staticpage_metakey;
    $metadesc_page = $row_vals->staticpage_metadesc;  
}
$CI->header_lib->display_header_element(array("script"=>array("jquery-1.4.2"),"page_title"=>$title,"metakey_page"=>$metakey_page,"metadesc_page"=>$metadesc_page));
$datas[''] = '' ;
$CI->header_lib->display_header($datas);

$CI->load->model('Directory_company_model');
//echo $CI->session_user_id;
$count = $CI->Directory_company_model->get_view_count($CI->session_user_id);
$listing_active = $CI->Directory_company_model->get_listing_status($CI->session_user_id);
?>

<div id="container_wrapper">
	<div id="body_container">
    	<?php echo $CI->header_lib->display_panel_left($data);?>
    	<div class="right_part">
       		<div class="double_line1">
            	<h2 class="head02">Escort directory</h2>
            </div>
            <div style="height:10px;"></div>
           
           <?php if(!empty($pagination)){?>
                <div class="pagination">
				<?php echo $pagination ?>
                <div class="clear"></div>
          		</div>
           <div class="line" style="margin-top:7px;"></div>
            <?php } ?>
            
          
            <!--disign directory-->
            
            <?php if(!empty($company_list)){ 
                     $this->load->helper('path');
                     $pathvar = set_realpath('',TRUE).'uploads/directory/company_logo/thumb/';
                           
                    foreach($company_list as $key=>$value){
                        ?>
                        <div class="design_directory0">
                        <?php
                       if($value['company_logo'] !='' && file_exists($pathvar.$value['company_logo'])){
                       ?>
                       
                        	<div class="left_design_directory">
                          
                                <a href="<?php echo site_url('directory/'.$value['company_slug_name'].$url); ?>">
                                        <img src="<?php echo $logo_thumbnail_folder.$value['company_logo'] ?>" />
                        		</a>
                            </div>
                    <?php
                    }else {
                    ?>
                    <div class="left_design_directory">
                          
                                <a href="<?php echo site_url('directory/'.$value['company_slug_name'].$url); ?>">
                                        <img src="<?php echo site_url().'xhtml/img/advertiser.gif' ?>" width="80px" />
                        		</a>
                            </div>
                    <?php
                    }
                    ?>
                        <div class="right_design_directory">
                            	<a href="<?php echo site_url('directory/'.$value['company_slug_name'].$url); ?>"><h3 class="style18"><?php echo $value['company'] ?></h3></a>
                                <a class="red13" href="<?php echo site_url('directory/'.$value['company_slug_name'].$url); ?>">  <?php echo $value['province_name'] ?></a>
                            </div>
                            <div class="clear"></div>    	
                      	</div>
                      <?php } ?>
                    <?php }else{ ?>
                        <div class="design_directory0">There is no agencies matching your criteria. Please search again.</div>
                    <?php } ?>

            <!--design directory ends-->
            <div class="line"></div>
            <?php if(!empty($pagination)){?>
            
            <div class="pagination">
                <?php echo $pagination ?>
                <div class="clear"></div>
           </div>
           <div class="line" style="margin-top:7px;"></div>
            <?php } ?>
        </div>
       
        <?php $this->load->view(TEMPLATE_NAME.'/front/side_right'); ?> 
         <div class="clear"></div>   
    </div>
</div>
 <?php $this->load->view(TEMPLATE_NAME.'/front/footer'); ?>